/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.comut.crud.ejb.interfaces;

import com.comut.crud.pojo.user.User;
import com.comut.lib.exception.ObjectFoundException;
import com.comut.lib.exception.ObjectNotFoundException;
import javax.jws.WebMethod;

/**
 *
 * @author asantos
 */
public interface IUserAction {

    /**
     * Inserts User on the database
     *
     * @param user the {@link User} to be inserted
     * @return the inserted {@link User}
     */
    @WebMethod
    public User insertUser(User user) throws ObjectFoundException;

    /**
     * Deletes a User from the database
     *
     * @param user the {@link User} to be deleted
     */
    @WebMethod
    public void deleteUser(User user) throws ObjectNotFoundException;

    /**
     * Update a event on the database
     *
     * @param user the update {@link user} *
     */
    @WebMethod
    public void updateUser(String user) throws ObjectNotFoundException;

    /**
     * Gets a User from the database
     *
     * @param user the {@link User} to be found
     * @return the {@link User} found
     */
    @WebMethod
    public User getUser(User user) throws ObjectNotFoundException;

    /**
     * Issue: IFL-1565
     *
     * @param login
     * @param password
     * @return
     * @throws ObjectNotFoundException
     */
    @WebMethod
    public com.comut.crud.pojo.mobile.User checkAuthentication(String login, String password) throws ObjectNotFoundException;
}
